<!--
See http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination
-->
<?php if ($this->pageCount > 1): ?>
	
	<ul class="cp_paging">
        <?php echo sprintf(YouNet_Util::translate('CP_PAGE_OF'), $this->current, $this->pageCount); ?>
        
		<?php if ($this->current == $this->first): ?>
			<li class="disabled">
				&laquo; <?php echo $this->translate('First') ?>
			</li>
		<?php else: ?>
			<li>
				<a href="<?php echo $this->pageUrl(array_merge(array('page' => $this->first), $this->query)); ?>">
					&laquo; <?php echo $this->translate('First') ?>
				</a>
			</li>
		<?php endif; ?>
		<!-- Previous page link -->
		<?php if (isset($this->previous)): ?>
			<li>	
				<a href="<?php echo $this->pageUrl(array_merge(array('page' => $this->previous), $this->query)); ?>">
					&lsaquo;
				</a> </li>
		<?php else: ?>
			<li class="disabled">&lsaquo;</li>
		<?php endif; ?>

		<!-- Numbered page links -->
		<?php foreach ($this->pagesInRange as $page): ?>
			<?php if ($page != $this->current): ?>
				<li>
					<a href="<?php echo $this->pageUrl(array_merge(array('page' => $page), $this->query)); ?>">
						<?php echo $page; ?>
					</a></li>
			<?php else: ?>
				<li class="active"><?php echo $page; ?></li>
			<?php endif; ?>
		<?php endforeach; ?>
		<!-- Next page link -->
		<?php if (isset($this->next)): ?>
			<li><a href="<?php echo $this->pageUrl(array_merge(array('page' => $this->next), $this->query)); ?>">
					&rsaquo;
				</a>
			</li>
		<?php else: ?>
			<li class="disabled">&rsaquo;</li>
		<?php endif; ?>
		<?php if ($this->current == $this->last): ?>
			<li class="disabled">
				<?php echo $this->translate('Last') ?> &raquo;
			</li>
		<?php else: ?>
			<li>
				<a href="<?php echo $this->pageUrl(array_merge(array('page' => $this->last), $this->query)); ?>">
					<?php echo $this->translate('Last') ?>	&raquo;
				</a>
			</li>
		<?php endif; ?>
	</ul>
<?php endif; ?>